package com.palmind.parser.tags;

import com.palmind.util.ArrayList;

/**
 * The class <code>Node</code> is a javabean that encapsulates the attributions
 * in tag &lt;node&gt;.
 * 
 * @author Jarod Yv
 */
public class NodeTag extends AbstractTag {
	public static final String[] ATTRIBUTE_NAMES = { "TEXT", "ID", "COLOR",
			"CREATED", "MODIFIED", "FOLDED", "POSITION", "LINK",
			"BACKGROUND_COLOR" };
	private ArrayList innerTags = null;

	public NodeTag() {
		type = NODE_TAG;
		attributeValues = new String[ATTRIBUTE_NAMES.length];
	}

	public String[] getAttributeNames() {
		return ATTRIBUTE_NAMES;
	}

	public void addInnerTags(AbstractTag innerTag) {
		if (innerTag == null)
			return;
		if (innerTags == null)
			innerTags = new ArrayList(2);
		innerTags.add(innerTag);
	}

	public ArrayList getInnerTags() {
		return innerTags;
	}
}
